package com.wfyn.reggie.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wfyn.reggie.modules.sys.domain.User;
import com.wfyn.reggie.modules.sys.service.UserService;
import com.wfyn.reggie.modules.sys.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author wfyn
* @description 针对表【user(用户信息)】的数据库操作Service实现
* @createDate 2023-09-25 15:59:00
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Autowired
    UserMapper userMapper;
    @Override
    public User getUserByPhone(String phone) {


        return  userMapper.selectOne(
                (new LambdaQueryWrapper<User>()
                .eq(User::getPhone,phone)));
    }
}




